home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 14 / Hot Mix 14.iso / HTML / vendors / finesse / examples / csh / display_primes < prev    next >
Text File  |  1996-06-27  |  839b  |  42 lines

  1. #! /bin/csh 
  2. # FINESSEAPPLICATIONKEY sBqQOLxzNvJgQ
  3. #
  4. #
  5. if (! $?FINESSEPATH) set FINESSEPATH = /usr/local/finesse
  6. source $FINESSEPATH/fscshinit
  7.  
  8. set path = ($path /usr/games)
  9.  
  10. # Definition
  11.  
  12. set i = 1
  13. set prf = "tf:background:black"
  14. set prf4 = "tf:foreground:red"
  15. set prf2 = "tf:labelString:Starting..."
  16.  
  17. set windef = \
  18. "FsWindow -name pw;FsSeparator;FsLabel -label $i -name tf;"
  19.  
  20. Fsopen
  21. while (1)
  22.   Fsdisplay -w $windef:q -n pw -s touch \
  23.             -r $prf -r $prf2 -r $prf4
  24.   if ( "$fsbutton" == "a" ) then
  25.     break
  26.   endif
  27.  
  28.   sleep 1
  29.   set i = `expr $i + 1`
  30.   set wl = (`factor $i`)
  31.   shift wl
  32.   if ( "$wl[1]" == "$i" ) then
  33.     set prf = "tf:background:black"  
  34.     set prf4 = "tf:foreground:red"
  35.   else 
  36.     set prf = "tf:background:blue"  
  37.     set prf4 = "tf:foreground:yellow"
  38.   endif
  39.   set prf2 = "tf:labelString:$i" 
  40. end
  41. Fsclose
  42.